package com.jhh.pay.heli.interceptor;

import com.google.gson.Gson;
import okhttp3.Interceptor;
import okhttp3.Request;
import okhttp3.Response;

import java.io.IOException;

/**
 * Created by zhangqi on 2017/12/7.
 */
public class ParamsInterceptor implements Interceptor {

    @Override
    public Response intercept(Chain chain) throws IOException {
        Request request = chain.request();
        System.out.println(new Gson().toJson(request.body()));
        return chain.proceed(request);
    }
}
